package com.gin.pixiv.response.ranking

import com.fasterxml.jackson.annotation.JsonAlias
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.gin.pixiv.deserializer.IntDeserializer
import com.gin.pixiv.deserializer.LocalDateStringDeserializer
import com.gin.pixiv.enums.RankingContent
import com.gin.pixiv.enums.RankingMode

/**
 * @author BX-Gin
 * @from 2024/2/26 11:45
 */
class IllustrationRankingBody {
    var content: RankingContent? = null

    var contents: List<IllustRankingContent>? = null

    var date: String? = null

    var mode: RankingMode? = null

    /**
     * 下一页
     */
    @set: JsonDeserialize(using = IntDeserializer::class)
    @set:JsonAlias("next")
    var nextPage: Int? = null

    /**
     * 下一个日期
     */
    @set:JsonAlias("next_date")
    @set:JsonDeserialize(using = LocalDateStringDeserializer::class)
    var nextDate: String? = null

    /**
     * 上一个日期
     */
    @set:JsonAlias("prev_date")
    @set:JsonDeserialize(using = LocalDateStringDeserializer::class)
    var prevDate: String? = null

    var page: Int? = null

    /**
     * 上一页
     */
    @set: JsonDeserialize(using = IntDeserializer::class)
    @set:JsonAlias("prev")
    var prevPage: Int? = null

    @set:JsonAlias("rank_total")
    var rankTotal: Int? = null


}